#ifndef MOVABLES_H
#define MOVABLES_H

#include <vector>
#include <Allegro5\allegro.h>
#include "GlobalVariables.h"
#include "Point.h"
#include "Map.h"
#include "Utilities.h"

using namespace std;

enum DetectionResult{CAN_MOVE, COLLISION, MONSTER_DEAD, DIGDUG_DEAD};

// Class Movables
/*!  \brief Movables is the parent class for all movable objects.

	 This is not a pure interface class, but makes use of polymorphism in several of its functions
*/

class Movables
{
public: 

	Movables(Point location, int radius, int speed, Movable_type type, ALLEGRO_BITMAP* bitmap);	//!< \fn Class constructor
	Movables(){}

	virtual DetectionResult move(Map &map) = 0;								//!< \fn Virtual move function to be implemented by subclasses
	DetectionResult checkMoveInDirection(Point location_from, Direction direction, Map& map);
	
	//! Set functions for given parameters:

	void direction(Direction dir);	//!< Set function for direction data member
	void location(Point location);
	
	//! Get functions for given parameters:

	Direction direction();	//!< Get function for direction data member
	Point location();
	int radius();
	Movable_type type();
	ALLEGRO_BITMAP *bitmap(); 

protected:

	Point _location;	
	int _radius;
	Direction _direction; // Enumm type defined in GloabalVariables 
	int _speed;
	ALLEGRO_BITMAP * _bitmap;
	Movable_type _type;

private:
	virtual DetectionResult collisionCheck(Movable_type position_type) const = 0;		//!< \fn Fully virtual function
	
};

#endif